<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>条件语句</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="root">
        <p v-if="seen">现在你看到我了</p>
        <div v-if="Math.random() > 0.5">
            sorry
        </div>
        <div v-else-if="Math.random() > 0.2">
            Not sorry
        </div>
        <div v-else>
            毁了
        </div>

        <div v-show="seen">v-show展示哟</div>
    </div>
</body>
<script>
    Vue.config.productionTip = false
    const x = new Vue({
        data() {
            return {
                seen: true
            }
        }
    }).$mount("root")
</script>
</html>